import { request } from '@/utils/http';

export function openidLogin(params) {
	return request.post('/api/user/openidLogin', params);
}
/**
 * 登录
 * @param params
 */
export function login(params) {
	return request.post('/api/user/login', params);
}
/**
 * 授权登录
 * @param params
 * @returns
 */
export function wxmobileLogin(params) {
	return request.Post('/api/user/wxmobileLogin', params);
}
/**
 * 登出
 */
export function logout() {
	return request.Post('/api/user/logout');
}

/**
 * 刷新token
 */
export function refreshToken() {
	return request.Post('/refresh/token', {});
}

/**
 * 获取用户信息
 * @returns
 */
export function getUserInfo() {
	return request.post('/api/user/index', { custom: { auth: true } });
}
/**
 * 修改用户信息
 * @returns
 */
export function userProfile(params) {
	return request.Post('/api/user/profile', params);
}
export function saveOpenid(params) {
	return request.Post('/api/user/saveopenid', params);
}
